﻿{extend name="public:base" /}

{block name="css"}
<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css"/>
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/style.css">
{/block}
{block name="content"}

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">姓名</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.username}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">提现金额</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.profit}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">账户名</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.real_name}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">账号</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.bank_num}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">开户行</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.bank_name}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        {if $info.status == 0}
                        <div class="box-item">
                            <div class="form-group row layui-form">
                                <label class="col-lg-1 col-form-label">状态</label>
                                <div class="col-lg-3">
                                    <input type="radio" name="status" value="1" title="审核通过" lay-filter="status" {$info.status != 2 ? 'checked' : ''}>
                                    <input type="radio" name="status" value="2" title="审核不通过" lay-filter="status" {$info.status == 2 ? 'checked' : ''}>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item reason-box" style="display: none">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">不通过原因</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" name="reason" placeholder="请输入不通过原因">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {else /}
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">状态</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.status_desc}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {/if}

                        {if $info.status == 2}
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">不通过原因</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.reason}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {/if}


                        <input type="hidden" name="id" value="{:input('id')}">

                        {if $info.status == 0 && $info.type == 1}
                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                        {/if}
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name='js'}
<script src="__STATIC__/layui/layui.js"></script>
<script>
    layui.use(['form'], function(){
        var form = layui.form;

        form.on('radio(status)', function(data){
            var status = data.value;
            if(status == 2){
                // 审核不通过
                $('.reason-box').show();
            }else{
                $('.reason-box').hide();
            }
        })

    })
</script>
{/block}
